;;;
;;;
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe Street
;;;		Southern Pines, NC 28387
;;;
;;;	http://www.paracadd.com
;;;
(defun c:zpoint ()
  (setq pt_lst nil tpt_lst nil)
  (setq ess (ssget))
  (setq esslen (sslength ess))
  (setq esscnt (1- esslen))
  (while (> esscnt 0)
    (setq ssent (entget(ssname ess esscnt)))
    (if pt_lst
      (setq pt_lst (append pt_lst (list(cdr(assoc 10 ssent)))))
      (setq pt_lst (list(cdr(assoc 10 ssent))))
    )
    (if (eq(cdr(assoc 0 ssent))"LINE")
      (setq pt_lst (append pt_lst (list(cdr(assoc 11 ssent)))))
    )
    (setq esscnt (1- esscnt))
  )
  (foreach n pt_lst
    (if tpt_lst
      (if (member n tpt_lst)
        nil
        (setq tpt_lst (append tpt_lst (list n)))
      )
      (setq tpt_lst (list n))
    )
  )
  (foreach n tpt_lst
    (if (=(caddr n)0)
      (setq ptss nil)
      (setq ptss (ssget "x" (list
                              (cons -4 "<AND")
                              (cons 0 "INSERT")
                              (cons 2 "POINT")
                              (cons 10 (list(car n)(cadr n)0))
                              (cons -4 "AND>")
                            )
                 )
      )
    )
    (if ptss
      (progn
        (setq ptent (entget(ssname ptss 0))
              hdent (cdar ptent))
        (princ "\nPoint found")
        (while
          (/=(cdr(assoc 0 ptent))"SEQEND")
;          (princ (cdr(assoc 0 ptent)))
          (if (eq(cdr(assoc 2 ptent))"ELEV")
            (progn
              (setq ptent (subst (cons 1 (rtos (caddr n)2 2))(assoc 1 ptent)ptent))
              (entmod ptent)
              (entupd hdent)
            (princ (strcat "\nModified \"ELEV\" to " (rtos (caddr n)2 2)))
            )
;            (princ "\nNot \"ELEV\"")
          )
          (setq ptent(entget(entnext(cdar ptent))))
        )
      )
    )
  )
  (princ)
)